<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$smarty.const.Site_Name}</title>
<link href="css/public.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="Js/string.js"></script>
<script type="text/javascript" src="Js/menu.js"></script>
<script type="text/javascript" src="Js/cart.js"></script>
<script type="text/javascript" src="Js/product.js"></script>
<script type="text/javascript" src="Js/exec.js"></script>
</head>

<body>
{include file="header.html"}
<div class="center">
	<div class="left">{include file="menu.html"}</div>
	<div class="right">
		<div class="Nav">
			<ul>
			{if $BTP[$get.open].del}<li><a href="{write_url open='customSMS' action='del'}">清空缓存</a></li>{/if}
			{if $BTP[$get.open].show}<li><a href="{write_url open='customSMS' action='show'}" {CLASS_COLOR show=$get.action CLASS='this'}>自定义群发手机短信</a></li>{/if}
			</ul>
			<span class="clear"></span>
		</div>
		{if $get.action == 'error'}
			<div style="padding:5em 0; text-align:center">
			{if $get.code == -1}
				短信发送未成功 , <a href="{write_url open='customSMS' action='send' go='goto'}">点击重新发送</a>
			{elseif $get.code == 1}
				手机号码不正确 , <a href="{write_url open='customSMS'}">请重新添加代理</a>
			{/if}
			</div>
		{elseif $get.action == 'successful'}
			<div style="padding:5em 0; text-align:center">
			{if count($back.customSMS)}
				<b style="color:#06F">{$back.customSMS_successful}</b> 部手机发送成功
				<b style="color:#F00">{count($back.customSMS)}</b> 部手机发送失败<br />
				<a href="{write_url open='customSMS' action='send' go='goto'}">点击重新发送</a>
			{else}
				<b style="color:#06F">{$back.customSMS_successful}</b> 部手机 已经全部 发送成功
			{/if}
			</div>
		{else}
		<div class="show">
				<table width="100%" border="0" cellspacing="1" cellpadding="0">
					<tr><th colspan="2">自定义 添加 手机号码</th></tr>
					<tr>
						<td width="45%" align="right" class="Need">手机号码</td>
						<td>
							<form action="{write_url url=$thisurl action='add'}" method="post">
								<input type="text" name="phone" style="width:150px;height:22px;line-height:22px" onfocus="sprintf('%d' , this)" maxlength="11" />
								<input type="submit" class="add_or" value="   添  加   " />
							</form>
						</td>
					</tr>
				</table>
				<form action="{write_url url=$thisurl action='send'}" method="post">
				<table width="100%" border="0" cellspacing="1" cellpadding="0" style="margin:1em 0 0 0">
					<tr align="center">
						<td>代理账号</td>
						<td>真实姓名</td>
						<td>昵称</td>
						<td>编号</td>
						<td>代理组</td>
						<td>公司</td>
						<th>手机号码</th>
						<td width="5%">删除</td>
					</tr>
					{foreach item=pso key=phone from=$back.customSMS}
					<tr>
						{if $pso == $proxy_list[$phone].tel}
						<td>{$proxy_list[$phone].account}</td>
						<td>{$proxy_list[$phone].name}</td>
						<td>{$proxy_list[$phone].nickname}</td>
						<td align="center">{$proxy_list[$phone].number}</td>
						<td>{$proxy_list[$phone].group}</td>
						<td>{$proxy_list[$phone].company_name}</td>
						<th>{$proxy_list[$phone].tel}</th>
						{else}
						<td colspan="6" align="center" style="background-color:#FFC">自定义 的 手机号码</td>
						<th>{$pso}</th>
						{/if}
						<td align="center" class="action">{if $BTP.customSMS.del}<a href="{write_url url=$thisurl action='del' phone=$pso}" class="act_1_5" title="删除"></a>{/if}</td>
					</tr>
					{/foreach}
					{if count($back.customSMS)}
					
					<tr><td colspan="8" align="center" style="color:#F00; height:25px">注意:如果添加的代理没有手机号码,或者号码不正确将不会被发送短信</td></tr>
					<tr>
						<td colspan="3" align="right" class="Need">短信内容</td>
						<td colspan="5">
							<textarea name="message" style="width:95%; height:100px;" onkeyup="Calculation(this , 'show_info');"></textarea>
							<div id="show_info" style="margin:0.5em 0 0 0"></div>
						</td>
					</tr>
					<tr><td colspan="8" align="center"><input type="submit" class="add_or" value="  发送短信  " /></td></tr>
					{/if}
				</table>
				</form>
		</div>
		{/if}
	</div>
	<b class="clear"></b>
</div>
</body>
</html>